package ysq.xyg.base.extend.ehcache;

import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import ysq.xyg.shop.model.po.ShopBank;
import ysq.xyg.shop.model.po.ShopBanner;
import ysq.xyg.shop.model.po.ShopItemCat;
import ysq.xyg.sys.model.po.SysConfig;

import java.util.List;

/**
 * 缓存
 *
 * @author taocongcong
 * @create 2019-04-11 17:19
 */
public interface EhCacheService {

    @CacheEvict(value={"cacheRecoveryLargeCat", "cacheRecoveryMiddleCat"}, allEntries=true)
    void evictRecoveryCat();

    @Cacheable(value="cacheShopItemCat")
    List<ShopItemCat> selectShopItemCatList();

    @CacheEvict(value={"cacheShopItemCat"}, allEntries=true)
    void evictShopItemCat();

    @Cacheable(value="cacheShopBanner")
    List<ShopBanner> selectShopBannerList();

    @CacheEvict(value={"cacheShopBanner"}, allEntries=true)
    void evictShopBanner();

    @Cacheable(value="cacheShopBank")
    List<ShopBank> selectShopBankList();

    @CacheEvict(value={"cacheShopBank"}, allEntries=true)
    void evictShopBank();

    @Cacheable(value="cacheSysConfig")
    List<SysConfig> selectSysConfigList();

    @CacheEvict(value={"cacheSysConfig"}, allEntries=true)
    void evictSysConfig();
}
